#include "BROKEN_IOCP.h"
#include "BROKEN_ThreadPool.h"

BROKEN_IOCP *iocp;

class CWorkThread
	:public BROKEN_Task
{
public:
	virtual void executeTask()
	{
		IOCP_WorkThread(iocp);
	};
};

class CAcceptThread
	:public BROKEN_Task
{
public:
	virtual void executeTask() 
	{
		IOCP_AcceptThread(iocp);
	};
};

int main() 
{
	iocp = new BROKEN_IOCP();
	iocp->BindAndListen(21295);
	BROKEN_ThreadPool *threadPool = new BROKEN_ThreadPool(10);
	threadPool->pushNewJob(new CAcceptThread());
	threadPool->pushNewJob(new CWorkThread());

	getchar();
	return 0;
}